define(function (require, exports, module) {
    var marked = require('../lib/marked');
    var articleList = require('../../archives/index');

    exports.getArticle = function (id) {
        var article = articleList[id];
        return {
            title: article.title,
            content: marked(article.content)
        };
    }

    exports.getList = function () {
        return articleList.map(article => article.title);
    }
});